# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor:  Adrian Bacircea <adrian.bacircea@gmail.com>

pkgname=libbpf
pkgver=0.5.0
pkgrel=1
pkgdesc='Library for loading eBPF programs and reading and manipulating eBPF objects from user-space'
url='https://github.com/libbpf/libbpf'
arch=('x86_64')
license=('LGPL2.1')
depends=('glibc' 'libelf' 'linux-api-headers')
makedepends=('rsync')
provides=('libbpf.so')
source=(https://github.com/libbpf/libbpf/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('3c578d3e6e93a306a1f182978e54f35fec8acfa51fad5d7de72c5003f10c266d7474e82d6dd045311fcaf8c18aa8cebe64a3336a458a9ea477e5a58e5111dd85')
b2sums=('9097d808f03cbbe61cd59b24347075e2937603f51350f83f8897123900c911392d7545af8135f39f749132c6518296f1a4d22d37c0c7b4371631f5c63a0dd9ac')

build() {
  cd ${pkgname}-${pkgver}
  make -C src
}

package() {
  cd ${pkgname}-${pkgver}
  make -C src DESTDIR="${pkgdir}" LIBSUBDIR=lib install install_headers
  install -Dm 644 LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
